<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateRongcloudResultsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('rongcloud_results', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('from_user_id')->default(0)->comment('发送者ID');
            $table->integer('to_user_id')->default(0)->comment('目标者ID');
            $table->string('msg_type', 50)->default('')->comment('消息类型');
            $table->string('content', 500)->default('')->comment('消息体');
            $table->text('result_detail')->comment('审核回调信息');
            $table->string('risk_level', 20)->default('')->comment('风险等级见数美');
            $table->string('risk_description', 200)->default('')->comment('风险原因');
            $table->string('msg_uid')->default('')->comment('融云消息ID ');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('rongcloud_results');
    }
}
